interface Function {
    myCall: (params: any) => void
}

Function.prototype.myCall = function(this: () => void, context, ...args) {
    // context = context || window
    context.fn = this
    const result = context.fn(...args)
    delete context.fn
    return result
}

function foo(this: any) {
    console.log(this.name)
}

foo.myCall({name: 'kaho'})

// export {}